Skip to content

Conversation

brianjlai
Copy link
Contributor

Fixes: https://github.com/airbytehq/airbyte-internal-issues/issues/14576

What

We had a previous swarm issue that ended up being a customer misconfiguration due to expired or invalid creds. That being said, the error message was particularly unhelpful w/ a bunch of python stack traces. This replace that with far more useful information:

{"type":"CONNECTION_STATUS","connectionStatus":{"status":"FAILED","message":"'Github credentials have expired or changed, please review your credentials and re-authenticate or renew your access token.'"}}

How

The main thing to call out here is that we want to get in the habit of using our dedicated HttpClient which gives us better error handling and just default behavior as a whole instead of using the requests library. Otherwise the rest is pretty straightforward

Review guide

nah

User Impact

none

Can this PR be safely reverted and rolled back?

  • YES 💚
  • NO ❌

Copy link
Contributor

github-actions bot commented Oct 9, 2025

👋 Greetings, Airbyte Team Member!

Here are some helpful tips and reminders for your convenience.

Helpful Resources

PR Slash Commands

Airbyte Maintainers (that's you!) can execute the following slash commands on your PR:

  • /format-fix - Fixes most formatting issues.
  • /bump-version - Bumps connector versions.
    • You can specify a custom changelog by passing changelog. Example: /bump-version changelog="My cool update"
    • Leaving the changelog arg blank will auto-populate the changelog from the PR title.
  • /run-cat-tests - Runs legacy CAT tests (Connector Acceptance Tests)
  • /build-connector-images - Builds and publishes a pre-release docker image for the modified connector(s).
  • JVM connectors:
    • /update-connector-cdk-version connector=<CONNECTOR_NAME> - Updates the specified connector to the latest CDK version.
      Example: /update-connector-cdk-version connector=destination-bigquery
    • /bump-bulk-cdk-version type=patch changelog='foo' - Bump the Bulk CDK's version. type can be major/minor/patch.
  • Python connectors:
    • /poe connector source-example lock - Run the Poe lock task on the source-example connector, committing the results back to the branch.
    • /poe source example lock - Alias for /poe connector source-example lock.
    • /poe source example use-cdk-branch my/branch - Pin the source-example CDK reference to the branch name specified.
    • /poe source example use-cdk-latest - Update the source-example CDK dependency to the latest available version.

📝 Edit this welcome message.

# It would've been nice to instantiate a single client on this authenticator. However, we are checking
# the limits of each token which is associated with a TokenAuthenticator. And each HttpClient can only
# correspond to one authenticator.
self._http_client = HttpClient(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually i had a thought, instantiating this every time we call this method is very costly, we can probably do some sort mapping of authenticators to the respective http client when we instantiate this authenticator so we don't keep building new ones

Copy link
Contributor

github-actions bot commented Oct 9, 2025

source-github Connector Test Results

92 tests   88 ✅  19s ⏱️
 3 suites   4 💤
 3 files     0 ❌

Results for commit 147520b.

♻️ This comment has been updated with latest results.

Copy link
Collaborator

@darynaishchenko darynaishchenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, just one small comment about the condition for error message.

org_name = message.split("https://api.github.com/orgs/")[1].split("/")[0]
user_message = f'Organization name: "{org_name}" is unknown, "repository" config option should be updated. Please validate your repository config.'
elif "401 Client Error: Unauthorized for url" in message:
elif "401 Client Error: Unauthorized for url" in message or "401. Error: Unauthorized" in message:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this condition be more general, for example, like 'Error: Unauthorized' in message and '401' in message. So we don't need to update this check every time we get new format of the error message?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep makes sense will do!

Copy link
Contributor

Deploy preview for airbyte-docs ready!

✅ Preview
https://airbyte-docs-syzyznoqs-airbyte-growth.vercel.app

Built with commit 147520b.
This pull request is being automatically deployed with vercel-action

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants